package com.shrct.businessprocess.budget.impl;

import com.shrct.businessprocess.budget.RCBudgetService;
import com.shrct.businessprocess.budget.RCHasCostBudget;
import com.shrct.businessprocess.budget.RCHasCostBudgetPayProcess;
import com.shrct.businessprocess.budget.impl.RCHasCostBudgetPayProcessImpl;
import com.shrct.businessprocess.project.RCProjectMoney;
import edu.fudan.mylang.pf.BaseService;
import edu.fudan.mylang.pf.IObjectFactory;
import org.eclipse.xtext.xbase.lib.ObjectExtensions;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("com.shrct.businessprocess.budget.RCBudgetService")
public class RCBudgetServiceImpl extends BaseService implements RCBudgetService {
  @Autowired
  private IObjectFactory objectFactory;
  
  public RCHasCostBudgetPayProcess startHasCostBudgetPayProcess(final RCProjectMoney amount, final RCHasCostBudget budget, final String comment) {
    RCHasCostBudgetPayProcess _create = RCHasCostBudgetPayProcessImpl.create(this.objectFactory);
    final Procedure1<RCHasCostBudgetPayProcess> _function = new Procedure1<RCHasCostBudgetPayProcess>() {
        public void apply(final RCHasCostBudgetPayProcess it) {
          it.start(amount, budget, comment);
        }
      };
    RCHasCostBudgetPayProcess _doubleArrow = ObjectExtensions.<RCHasCostBudgetPayProcess>operator_doubleArrow(_create, _function);
    return _doubleArrow;
  }
}
